/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JP_ListarAcciones.java
 *
 * Created on Aug 11, 2009, 7:06:25 AM
 */

package gui;

import delegate.GestionDelegate;
import controlacciones.ejb3.entity.TbArea;
import controlacciones.ejb3.pojo.TableBeanBinding_DatosAcciones;
import helper.JP_Modelo;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.text.MaskFormatter;
import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JasperViewer;

/**
 *
 * @author Vanessa
 */
public class JP_ListarCargaTrabajo extends JP_Modelo {

    /** Creates new form JP_ListarAcciones */
    public JP_ListarCargaTrabajo() {
        inicializaComponentes();
    }

    private void inicializaComponentes(){
        initComponents();
        this.cargaComboArea();
    }

    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        comboBeanBindingArea1 = new beansbinding.ComboBeanBindingArea();
        comboBeanBindingTbTipoAccionClasificacionAccionArea1 = new beansbinding.ComboBeanBindingTbTipoAccionClasificacionAccionArea();
        jp_DocumentoIdentificacion = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        cmbArea = new javax.swing.JComboBox();
        try{
            mascara = new javax.swing.text.MaskFormatter("##/##/####");
        }catch(Exception e){
            System.out.println("Error en mascara");
        }

        ftxtFecIni = new javax.swing.JFormattedTextField();
        ftxtFecIni = new javax.swing.JFormattedTextField(mascara);

        try{
            mascara = new javax.swing.text.MaskFormatter("##/##/####");
        }catch(Exception e){
            System.out.println("Error en mascara");
        }

        ftxtFecFin = new javax.swing.JFormattedTextField();
        ftxtFecFin = new javax.swing.JFormattedTextField(mascara);

        btnCerrar = new javax.swing.JButton();
        btnReporte1 = new javax.swing.JButton();
        jp_DocumentoIdentificacion1 = new javax.swing.JPanel();
        chkReporte1 = new javax.swing.JCheckBox();
        chkReporte2 = new javax.swing.JCheckBox();
        chkReporte3 = new javax.swing.JCheckBox();
        chkReporte4 = new javax.swing.JCheckBox();
        chkReporte5 = new javax.swing.JCheckBox();
        jp_Derechohabientes = new javax.swing.JPanel();
        chkRep1 = new javax.swing.JCheckBox();
        chkRep2 = new javax.swing.JCheckBox();
        chkRep3 = new javax.swing.JCheckBox();
        chkRep4 = new javax.swing.JCheckBox();
        chkRep5 = new javax.swing.JCheckBox();
        chkRep6 = new javax.swing.JCheckBox();

        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(controlaccionescomercial.ControlAccionesComercialApp.class).getContext().getResourceMap(JP_ListarCargaTrabajo.class);
        jp_DocumentoIdentificacion.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jp_DocumentoIdentificacion.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jp_DocumentoIdentificacion.border.titleFont"))); // NOI18N
        jp_DocumentoIdentificacion.setName("jp_DocumentoIdentificacion"); // NOI18N

        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setFont(resourceMap.getFont("jLabel4.font")); // NOI18N
        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        cmbArea.setName("cmbArea"); // NOI18N

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, comboBeanBindingArea1, eLProperty, cmbArea);
        bindingGroup.addBinding(jComboBoxBinding);

        ftxtFecIni.setName("ftxtFecIni"); // NOI18N

        ftxtFecFin.setName("ftxtFecFin"); // NOI18N

        javax.swing.GroupLayout jp_DocumentoIdentificacionLayout = new javax.swing.GroupLayout(jp_DocumentoIdentificacion);
        jp_DocumentoIdentificacion.setLayout(jp_DocumentoIdentificacionLayout);
        jp_DocumentoIdentificacionLayout.setHorizontalGroup(
            jp_DocumentoIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_DocumentoIdentificacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jp_DocumentoIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jp_DocumentoIdentificacionLayout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(72, 72, 72)
                        .addComponent(cmbArea, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jp_DocumentoIdentificacionLayout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(29, 29, 29)
                        .addComponent(ftxtFecIni, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel4)
                        .addGap(17, 17, 17)
                        .addComponent(ftxtFecFin, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(42, Short.MAX_VALUE))
        );
        jp_DocumentoIdentificacionLayout.setVerticalGroup(
            jp_DocumentoIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_DocumentoIdentificacionLayout.createSequentialGroup()
                .addGroup(jp_DocumentoIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(cmbArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jp_DocumentoIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(ftxtFecIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(ftxtFecFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        btnCerrar.setFont(resourceMap.getFont("btnCerrar.font")); // NOI18N
        btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/fife/plaf/Office2003/close.gif"))); // NOI18N
        btnCerrar.setText(resourceMap.getString("btnCerrar.text")); // NOI18N
        btnCerrar.setName("btnCerrar"); // NOI18N
        btnCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarActionPerformed(evt);
            }
        });

        btnReporte1.setFont(resourceMap.getFont("btnReporte1.font")); // NOI18N
        btnReporte1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/fife/plaf/Office2003/printpreview.gif"))); // NOI18N
        btnReporte1.setText(resourceMap.getString("btnReporte1.text")); // NOI18N
        btnReporte1.setName("btnReporte1"); // NOI18N
        btnReporte1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnReporte1ActionPerformed(evt);
            }
        });

        jp_DocumentoIdentificacion1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jp_DocumentoIdentificacion1.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jp_DocumentoIdentificacion1.border.titleFont"))); // NOI18N
        jp_DocumentoIdentificacion1.setName("jp_DocumentoIdentificacion1"); // NOI18N

        chkReporte1.setFont(resourceMap.getFont("chkReporte1.font")); // NOI18N
        chkReporte1.setText(resourceMap.getString("chkReporte1.text")); // NOI18N
        chkReporte1.setName("chkReporte1"); // NOI18N

        chkReporte2.setFont(new java.awt.Font("Tahoma", 1, 11));
        chkReporte2.setText(resourceMap.getString("chkReporte2.text")); // NOI18N
        chkReporte2.setName("chkReporte2"); // NOI18N

        chkReporte3.setFont(resourceMap.getFont("chkReporte3.font")); // NOI18N
        chkReporte3.setText(resourceMap.getString("chkReporte3.text")); // NOI18N
        chkReporte3.setName("chkReporte3"); // NOI18N

        chkReporte4.setFont(resourceMap.getFont("chkReporte4.font")); // NOI18N
        chkReporte4.setText(resourceMap.getString("chkReporte4.text")); // NOI18N
        chkReporte4.setName("chkReporte4"); // NOI18N

        chkReporte5.setFont(resourceMap.getFont("chkReporte5.font")); // NOI18N
        chkReporte5.setText(resourceMap.getString("chkReporte5.text")); // NOI18N
        chkReporte5.setName("chkReporte5"); // NOI18N

        javax.swing.GroupLayout jp_DocumentoIdentificacion1Layout = new javax.swing.GroupLayout(jp_DocumentoIdentificacion1);
        jp_DocumentoIdentificacion1.setLayout(jp_DocumentoIdentificacion1Layout);
        jp_DocumentoIdentificacion1Layout.setHorizontalGroup(
            jp_DocumentoIdentificacion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_DocumentoIdentificacion1Layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(jp_DocumentoIdentificacion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jp_DocumentoIdentificacion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(chkReporte3, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(chkReporte2, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(chkReporte1, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(chkReporte4, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
                    .addComponent(chkReporte5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(20, 20, 20))
        );
        jp_DocumentoIdentificacion1Layout.setVerticalGroup(
            jp_DocumentoIdentificacion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_DocumentoIdentificacion1Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addComponent(chkReporte1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(chkReporte2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(chkReporte3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkReporte4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkReporte5)
                .addContainerGap(11, Short.MAX_VALUE))
        );

        jp_Derechohabientes.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jp_Derechohabientes.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jp_Derechohabientes.border.titleFont"))); // NOI18N
        jp_Derechohabientes.setName("jp_Derechohabientes"); // NOI18N

        chkRep1.setFont(resourceMap.getFont("chkRep1.font")); // NOI18N
        chkRep1.setText(resourceMap.getString("chkRep1.text")); // NOI18N
        chkRep1.setName("chkRep1"); // NOI18N

        chkRep2.setFont(resourceMap.getFont("chkRep2.font")); // NOI18N
        chkRep2.setText(resourceMap.getString("chkRep2.text")); // NOI18N
        chkRep2.setName("chkRep2"); // NOI18N

        chkRep3.setFont(resourceMap.getFont("chkRep3.font")); // NOI18N
        chkRep3.setText(resourceMap.getString("chkRep3.text")); // NOI18N
        chkRep3.setName("chkRep3"); // NOI18N

        chkRep4.setFont(resourceMap.getFont("chkRep4.font")); // NOI18N
        chkRep4.setText(resourceMap.getString("chkRep4.text")); // NOI18N
        chkRep4.setName("chkRep4"); // NOI18N

        chkRep5.setFont(resourceMap.getFont("chkRep5.font")); // NOI18N
        chkRep5.setText(resourceMap.getString("chkRep5.text")); // NOI18N
        chkRep5.setName("chkRep5"); // NOI18N

        chkRep6.setFont(resourceMap.getFont("chkRep6.font")); // NOI18N
        chkRep6.setText(resourceMap.getString("chkRep6.text")); // NOI18N
        chkRep6.setName("chkRep6"); // NOI18N

        javax.swing.GroupLayout jp_DerechohabientesLayout = new javax.swing.GroupLayout(jp_Derechohabientes);
        jp_Derechohabientes.setLayout(jp_DerechohabientesLayout);
        jp_DerechohabientesLayout.setHorizontalGroup(
            jp_DerechohabientesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_DerechohabientesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jp_DerechohabientesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chkRep1)
                    .addComponent(chkRep2)
                    .addComponent(chkRep3)
                    .addComponent(chkRep4)
                    .addComponent(chkRep5)
                    .addComponent(chkRep6))
                .addContainerGap(46, Short.MAX_VALUE))
        );
        jp_DerechohabientesLayout.setVerticalGroup(
            jp_DerechohabientesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_DerechohabientesLayout.createSequentialGroup()
                .addComponent(chkRep1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRep2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRep3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRep4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRep5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(chkRep6)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(260, 260, 260)
                        .addComponent(btnReporte1)
                        .addGap(18, 18, 18)
                        .addComponent(btnCerrar))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jp_DocumentoIdentificacion, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jp_DocumentoIdentificacion1, javax.swing.GroupLayout.Alignment.LEADING, 0, 483, Short.MAX_VALUE)
                        .addComponent(jp_Derechohabientes, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jp_DocumentoIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jp_Derechohabientes, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jp_DocumentoIdentificacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnReporte1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnCerrar))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        bindingGroup.bind();
    }// </editor-fold>//GEN-END:initComponents

    private void cargaComboArea(){
        List listTbArea = null; // seteamos variable local
        List listaArea = comboBeanBindingArea1.getLista();
        listaArea.clear();
        try {
            listTbArea = GestionDelegate.getInstance().getListaArea();
        } catch (Exception e) {
            System.out.println( "Error en gestionDelegate.getListaArea()" );
            return;
        }
        this.comboBeanBindingArea1.setLista(listTbArea);
        this.bindingGroup.bind();
        this.cmbArea.updateUI();
    }
    
    private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed
        this.cerrarPadre();
}//GEN-LAST:event_btnCerrarActionPerformed

    private void btnReporte1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReporte1ActionPerformed
        JasperViewer jv = null;
        Map parametros = new HashMap();

        String cod_area;
        String fechaIni;
        String fechaFin;

        cod_area = ((TbArea) this.cmbArea.getSelectedItem()).getCodArea();
        fechaIni = this.ftxtFecIni.getText().trim();
        fechaFin = this.ftxtFecFin.getText().trim();        

        parametros.put("COD_AREA", cod_area );
        parametros.put("FEC_INICIO", fechaIni);
        parametros.put("FEC_FIN", fechaFin );

        if( this.chkRep1.isSelected() ){
            JasperPrint jp = null;
            try {
                jp = GestionDelegate.getInstance().generarReporte("Reporte_Acciones_Area_Intervalo_Fechas.jasper", parametros);
            } catch (SQLException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            } catch (JRException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            }
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }

        if( this.chkRep2.isSelected()){
            JasperPrint jp = null;
            try {
                jp = GestionDelegate.getInstance().generarReporte("Reporte_resultados_Area_Intervalo_Fechas.jasper", parametros);
            } catch (SQLException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            } catch (JRException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            }
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }
        
        if( this.chkRep3.isSelected()){
            JasperPrint jp = null;
            try {
                jp = GestionDelegate.getInstance().generarReporte("Reporte_resultados_Intervalo_Fechas.jasper", parametros);
            } catch (SQLException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            } catch (JRException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            }
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }


        if( this.chkRep4.isSelected()){
            JasperPrint jp = null;
            try {
                jp = GestionDelegate.getInstance().generarReporte("Reporte_Resumen_Intervalo_Fechas2.jasper", parametros);
            } catch (SQLException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            } catch (JRException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            }
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }

        if( this.chkRep5.isSelected()){
            JasperPrint jp = null;
            try {
                jp = GestionDelegate.getInstance().generarReporte("Reporte_Resumen_area_Intervalo_Fechas.jasper", parametros);
            } catch (SQLException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            } catch (JRException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            }
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }

        if( this.chkRep6.isSelected()){
            JasperPrint jp = null;
            try {
                jp = GestionDelegate.getInstance().generarReporte("Reporte_Resumen_Periodo.jasper", parametros);
            } catch (SQLException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            } catch (JRException ex) {
                Logger.getLogger(JP_ListarAcciones.class.getName()).log(Level.SEVERE, null, ex);
            }
            jv = new JasperViewer(jp, false);
            jv.setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);
            jv.setVisible(true);
        }



    }//GEN-LAST:event_btnReporte1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnReporte1;
    private javax.swing.JCheckBox chkRep1;
    private javax.swing.JCheckBox chkRep2;
    private javax.swing.JCheckBox chkRep3;
    private javax.swing.JCheckBox chkRep4;
    private javax.swing.JCheckBox chkRep5;
    private javax.swing.JCheckBox chkRep6;
    private javax.swing.JCheckBox chkReporte1;
    private javax.swing.JCheckBox chkReporte2;
    private javax.swing.JCheckBox chkReporte3;
    private javax.swing.JCheckBox chkReporte4;
    private javax.swing.JCheckBox chkReporte5;
    private javax.swing.JComboBox cmbArea;
    private beansbinding.ComboBeanBindingArea comboBeanBindingArea1;
    private beansbinding.ComboBeanBindingTbTipoAccionClasificacionAccionArea comboBeanBindingTbTipoAccionClasificacionAccionArea1;
    private javax.swing.JFormattedTextField ftxtFecFin;
    private javax.swing.JFormattedTextField ftxtFecIni;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jp_Derechohabientes;
    private javax.swing.JPanel jp_DocumentoIdentificacion;
    private javax.swing.JPanel jp_DocumentoIdentificacion1;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

    private org.jdesktop.swingbinding.JTableBinding jTableBinding;
    private List<TableBeanBinding_DatosAcciones> listaDatos;
    private MaskFormatter mascara;
}
